<?php
class GnrtController extends ControllerBase {
  public $custom_layout_path = FRAMEWORK_TEMPLATE_LAYOUTS_PATH;
  public $default_layout = "gnrt";
  
  public function _index() {
    $this->render_template("index");
  }
  
  public function _model() {
    $this->render_template("model");
  }
  
  public function _controller() {
    $this->render_template("controller");
  }
  
  public function _scaffold() {
    $this->render_template("scaffold");
  }
  
  public function _create_scaffold() {
    Gnrt::scaffold($_POST['gnrt']);
    $this->render_nothing();
  }
  
  protected function render_template($name) {
    $this->render_default_template = false;
    include(FRAMEWORK_TEMPLATE_PATH . "gnrt/$name.php");
  }
}
?>